{% extends "profiles/base.html" %}{% load thumbnail %}

{% block title %}Edit profile{% endblock %}

{% block content %}
	
	{% if profile.mugshot %}
	{% thumbnail profile.mugshot 200x150 detail as image %}
	<img src="{{ image }}" width="{{ image.width }}" height="{{ image.height }}" border="0" alt="{{ profile }}" />
	<hr class="space"/>
	{% endif %}

	<form action="." method="post" enctype="multipart/form-data" class="profile_form">
		
		<fieldset class="top border">
			
			<hr class="space"/>
			<h3>General information</h3>
			<hr/>
			
			<p>{{ user_form.first_name.label_tag }} <span class="h4">{{ user_form.first_name }}</span>{{ user_form.first_name.errors }}</p>
			<p>{{ user_form.last_name.label_tag }} <span class="h4">{{ user_form.last_name }}</span>{{ user_form.last_name.errors }}</p>
			
			<p>{{ profile_form.gender.label_tag }} <span class="h4">{{ profile_form.gender }}</span>{{ profile_form.gender.errors }}</p>
			<p>{{ profile_form.mugshot.label_tag }} <span class="h4">{{ profile_form.mugshot }}</span>{{ profile_form.mugshot.errors }}</p>
			<p>{{ profile_form.birth_date.label_tag }} <span class="h4">{{ profile_form.birth_date }}</span>{{ profile_form.birth_date.errors }}</p>
			<p>{{ profile_form.address1.label_tag }} <span class="h4">{{ profile_form.address1 }}</span>{{ profile_form.address1.errors }}</p>
			<p>{{ profile_form.address2.label_tag }} <span class="h4">{{ profile_form.address2 }}</span>{{ profile_form.address2.errors }}</p>
			<p>{{ profile_form.city.label_tag }} <span class="h4">{{ profile_form.city }}</span>{{ profile_form.city.errors }}</p>
			<p>{{ profile_form.state.label_tag }} <span class="h4">{{ profile_form.state }}</span>{{ profile_form.state.errors }}</p>
			<p>{{ profile_form.zip.label_tag }} <span class="h4">{{ profile_form.zip }}</span>{{ profile_form.zip.errors }}</p>
			<p>{{ profile_form.country.label_tag }} <span class="h4">{{ profile_form.country }}</span>{{ profile_form.country.errors }}</p>
			<p>{{ profile_form.mobile.label_tag }} <span class="h4">{{ profile_form.mobile }}</span>{{ profile_form.mobile.errors }}</p>
			<p>{{ profile_form.mobile_provider.label_tag }} <span class="h4">{{ profile_form.mobile_provider }}</span>{{ profile_form.mobile_provider.errors }}</p>

		</fieldset>
    	
    	
		<fieldset class="top border">
			
			<hr class="space"/>
			<h3>Other profiles <small>(e.g. Flickr, Twitter, etc.)</small></h3>
			<hr/>
			
			{{ service_formset.management_form }}
			{% for form in service_formset.forms %}
			<ul class="service">
				{{ form.as_p }}
			</ul>
			<hr/>
			{% endfor %}
			<p class="quiet">To add more services than displayed save and continue editing.</p>
			
		</fieldset>
    	
    	
		<fieldset class="top border">
			<hr class="space"/>
			<h3>Personal links <small>(Example: Your blog, you personal site, etc.)</small></h3>
			<hr/>
			
			{{ link_formset.management_form }}
      		{% for form in link_formset.forms %}
			<ul class="link">
				{{ form.as_p }}
			</ul>
			<hr/>
			{% endfor %}
			<p class="quiet">To add more links than displayed save and continue editing.</p>
			
		</fieldset>
		
		<p><input class="button" type="submit" value="Save Profile"><input class="button" type="reset" value="Reset Form"></p>
		
	</form>
{% endblock %}